Create a new instance of the LearningStoreQuery class
Parent Type: LearningStore
Namespace: Microsoft.LearningComponents.Storage
Assembly: Microsoft.LearningComponents.Storage.dll
| C# |
|
public LearningStoreQuery CreateQuery ( ) |
viewName
Name of the view for the query. If this is an item type name, then the default view for the item type is used.
A new LearningStoreQuery
| Exception type | Condition |
| ArgumentNullException | viewName is a null reference. |
| InvalidOperationException | The store was created by a different version of this product, the schema information stored inside the database is invalid, or viewName does not refer to a view or item type in the store. |
| SqlException | The database could not be opened or other SQL error. |
See the LearningStoreQuery documentation for more information about constructing queries.
The following code opens a store and creates a new query:
| C# |
LearningStore store = new LearningStore("Server=Learning;Database=Mls;Integrated Security=true", "Bob");
LearningStoreQuery query = store.CreateQuery("AttemptItem");
|